package java_thinking.unit_11._11_2;

import java.util.Collection;
import java.util.HashSet;

/**
 * @Description : 用hashset打印出来只会有一个0.用ArrayList会有两个0
 * @author: cww
 * @DateTime: 2019-03-17 11:13
 */

public class E2 {
    public static void main(String[] args) {
        Collection<Integer> integers = new HashSet<>();
        integers.add(0);
        for (int i = 0;i<10;i++){
            integers.add(i);
        }
        for (Integer i:integers){
            System.out.println(i+",");
        }
    }
}
